<!DOCTYPE html>
<html lang="en" dir="auto">

<head>
	<meta name="generator" content="Hugo 0.107.0"><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>My New Hugo Site</title>

<meta name="description" content="">
<meta name="author" content="">
<link rel="canonical" href="https://gitee.com/mi-mi-tea/linux/">
<link crossorigin="anonymous" href="./css/style.css" integrity="sha256-vBFJ9KcqpIWNOp9xRi915YhP/oBz6p1tV2HVZj1lHiA=" rel="preload stylesheet" as="style">
<link rel="icon" href="https://gitee.com/mi-mi-tea/linux/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="https://gitee.com/mi-mi-tea/linux/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://gitee.com/mi-mi-tea/linux/favicon-32x32.png">
<link rel="apple-touch-icon" href="https://gitee.com/mi-mi-tea/linux/apple-touch-icon.png">
<link rel="mask-icon" href="https://gitee.com/mi-mi-tea/linux/safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="https://gitee.com/mi-mi-tea/linux/index.xml">
<noscript>
    <style>
        #theme-toggle,
        .top-link {
            display: none;
        }

    </style>
    <style>
        @media (prefers-color-scheme: dark) {
            :root {
                --theme: rgb(29, 30, 32);
                --entry: rgb(46, 46, 51);
                --primary: rgb(218, 218, 219);
                --secondary: rgb(155, 156, 157);
                --tertiary: rgb(65, 66, 68);
                --content: rgb(196, 196, 197);
                --hljs-bg: rgb(46, 46, 51);
                --code-bg: rgb(55, 56, 62);
                --border: rgb(51, 51, 51);
            }

            .list {
                background: var(--theme);
            }

            .list:not(.dark)::-webkit-scrollbar-track {
                background: 0 0;
            }

            .list:not(.dark)::-webkit-scrollbar-thumb {
                border-color: var(--theme);
            }
        }

    </style>
</noscript><meta property="og:title" content="My New Hugo Site" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://gitee.com/mi-mi-tea/linux/" />

<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="My New Hugo Site"/>
<meta name="twitter:description" content=""/>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "My New Hugo Site",
  "url": "https://gitee.com/mi-mi-tea/linux",
  "description": "",
  "thumbnailUrl": "https://gitee.com/mi-mi-tea/linux/favicon.ico",
  "sameAs": [
      
  ]
}
</script>
</head>

<body class="list" id="top">
<script>
    if (localStorage.getItem("pref-theme") === "dark") {
        document.body.classList.add('dark');
    } else if (localStorage.getItem("pref-theme") === "light") {
        document.body.classList.remove('dark')
    } else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
        document.body.classList.add('dark');
    }

</script>

<header class="header">
    <nav class="nav">
        <div class="logo">
            <a href="https://gitee.com/mi-mi-tea/linux" accesskey="h" title="My New Hugo Site (Alt + H)">My New Hugo Site</a>
            <div class="logo-switches">
                <button id="theme-toggle" accesskey="t" title="(Alt + T)">
                    <svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                        stroke-linejoin="round">
                        <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
                    </svg>
                    <svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                        stroke-linejoin="round">
                        <circle cx="12" cy="12" r="5"></circle>
                        <line x1="12" y1="1" x2="12" y2="3"></line>
                        <line x1="12" y1="21" x2="12" y2="23"></line>
                        <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
                        <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
                        <line x1="1" y1="12" x2="3" y2="12"></line>
                        <line x1="21" y1="12" x2="23" y2="12"></line>
                        <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
                        <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
                    </svg>
                </button>
            </div>
        </div>
        <ul id="menu">
        </ul>
    </nav>
</header>
<main class="main"> 

<article class="first-entry"> 
  <header class="entry-header">
    <h2>My first Blog<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>
    </h2>
  </header>
  <div class="entry-content">
    <p>Linux大作业步骤
安装git ,查询版本
初始化gitee仓库
利用socket 技术编写程序，包含客户端和服务端，实现两者之间的信息传递，这里我使用的编程语言是C&#43;&#43; 首先在Linux安装C&#43;&#43;环境并配置（参考网址：http://t.csdn.cn/6TYDU)
下载：
• 安装gcc和gcc-c&#43;&#43;命令：yum install -y gcc gcc-c&#43;&#43;
• 安装vim命令：yum install -y vim
• 安装git命令:yum install -y git
测试：创建test.cpp文件输出hello
编写Socket客户端和服务端代码
•服务端代码：
•客户端代码：
编写完毕 启动服务端和客户端
•可以看到服务端已经启动成功，此时启动客户端,服务端显示两个用户进入聊天室
•之后两个用户即可实现对话，服务器也能接收到来自两个用户发出的信息
将代码提交到Gitee，并在我的仓库查看提交情况
从GitHub上下载 Hugo
•wget https://github.com/gohugoio/hugo/releases/download/v0.107.0/hugo_0.107.0_linux-amd64.deb
在根目录下 sudo yum install dpkg安装dpkg
对hugo的deb文件进行安装
•sudo dpkg -i hugo_0.107.0_linux-amd64.deb.1
用hugo来生成博客(myblog 为博客的目录名)
•hugo new site myblog
在https://themes.gohugo.io下载并设置主题，
•git clone https://github.com/adityatelange/hugo-PaperMod.git mythems
/* **这个hugo包（基础版）不支持sass，所以主题中包含有sass的用不了，主题网站，比较复杂的都是用sass，尽量挑&gt;简单的。点进去有GitHub地址，看asset文件夹中下面有无sass的字样 有则不能用。 */
在本地启动博客 •hugo server -t mythems –buildDrafts
访问 Web Server is available at http://localhost:1313/ (bind address 127....</p>
  </div>
  <footer class="entry-footer"><span title='2022-12-09 01:09:14 +0800 CST'>December 9, 2022</span></footer>
  <a class="entry-link" aria-label="post link to My first Blog" href="https://gitee.com/mi-mi-tea/linux/post/blog/"></a>
</article>
    </main>
    
<footer class="footer">
    <span>&copy; 2022 <a href="https://gitee.com/mi-mi-tea/linux">My New Hugo Site</a></span>
    <span>
        Powered by
        <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
        <a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
    </span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
        <path d="M12 6H0l6-6z" />
    </svg>
</a>

<script>
    let menu = document.getElementById('menu')
    if (menu) {
        menu.scrollLeft = localStorage.getItem("menu-scroll-position");
        menu.onscroll = function () {
            localStorage.setItem("menu-scroll-position", menu.scrollLeft);
        }
    }

    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener("click", function (e) {
            e.preventDefault();
            var id = this.getAttribute("href").substr(1);
            if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
                document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
                    behavior: "smooth"
                });
            } else {
                document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
            }
            if (id === "top") {
                history.replaceState(null, null, " ");
            } else {
                history.pushState(null, null, `#${id}`);
            }
        });
    });

</script>
<script>
    var mybutton = document.getElementById("top-link");
    window.onscroll = function () {
        if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
            mybutton.style.visibility = "visible";
            mybutton.style.opacity = "1";
        } else {
            mybutton.style.visibility = "hidden";
            mybutton.style.opacity = "0";
        }
    };

</script>
<script>
    document.getElementById("theme-toggle").addEventListener("click", () => {
        if (document.body.className.includes("dark")) {
            document.body.classList.remove('dark');
            localStorage.setItem("pref-theme", 'light');
        } else {
            document.body.classList.add('dark');
            localStorage.setItem("pref-theme", 'dark');
        }
    })

</script>
</body>

</html>
